import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'/about',
    children:[
        {path: '/about', component: () => import('../views/AboutView.vue')},
        {path: '/test', component: () => import('../views/TestView.vue')},
        {path: '/user', component: () => import('../views/sys/UserView.vue')},
        {path: '/role', component: () => import('../views/sys/RoleView.vue')},
        {path: '/dept', component: () => import('../views/sys/DepartmentView.vue')},
        {path: '/anno', component: () => import('../views/announcement/AnnouncementView.vue')},
        {path: '/asset', component: () => import('../views/asset/AssetView.vue')},
        {path: '/assetProject', component: () => import('../views/assetProject/AssetProject.vue')},
        {path: '/assetReq', component: () => import('../views/asset/AssetRequisitionView.vue')},
        {path: '/assetCheck', component: () => import('../views/asset/AssetCheck.vue')},
        {path: '/attendance', component: () => import('../views/attendance/AttendanceView.vue')},
        {path: '/management', component: () => import('../views/attendance/ManagementView.vue')},
        {path: '/atteRule', component: () => import('../views/attendance/AttendanceRuleView.vue')},
        {path: '/overtime', component: () => import('../views/attendance/OverTimeView.vue')},
        {path: '/leave', component: () => import('../views/attendance/LeaveView.vue')},
        {path: '/replenish', component: () => import('../views/attendance/ReplenishView.vue')},
        {path: '/note', component: () => import('../views/note/NoteView.vue')},
        {path: '/repair', component: () => import('../views/repair/RepairView.vue')},
        {path: '/vehicle', component: () => import('../views/vehicle/VehicleView.vue')},
        {path: '/target', component: () => import('../views/assess/TargetView.vue')},
        {path: '/assessLevel', component: () => import('../views/assess/AssessLevel.vue')},
        {path: '/mode', component: () => import('../views/assess/ModeView.vue')}
    ]
  },
  {path: '/login', component: () => import(/* webpackChunkName: "about" */ '../views/LoginView.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
